import { MESSAGETYPE, SENDTOPHONE, MESSAGESTSTUS } from 'configs/constants';
import { formatValue } from 'utils/share';

export default [
  {
    title: '消息名称',
    dataIndex: 'title',
    render: (value) => formatValue(value)
  },
  {
    title: '类型',
    dataIndex: 'type',
    render: (value) => formatValue((MESSAGETYPE[value] && MESSAGETYPE[value].name) || '')
  },
  {
    title: '消息状态',
    dataIndex: 'recStatus',
    render: (value) => formatValue(MESSAGESTSTUS[value].name)
  },
  {
    title: '发送消息人',
    dataIndex: 'username',
    render: (value) => formatValue(value)
  },

  {
    title: '是否发送手机短信',
    dataIndex: 'sendToPhone',
    render: (value) => formatValue((SENDTOPHONE[value] && SENDTOPHONE[value].name) || '')
  },
  {
    title: '内容',
    dataIndex: 'content',
    render: (value) => formatValue(value)
  },
  {
    title: '创建时间',
    dataIndex: 'createTime',
    render: (value) => formatValue(value)
  }
];
